<%@ Page Language="C#" Culture="en-GB" UICulture="en-GB" MasterPageFile="~/WebMaster.master"
    AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <br />
    <asp:LoginView ID="LoginView1" runat="server">
        <LoggedInTemplate>
            Hello
            <asp:LoginName ID="LoginName1" runat="server" />, here are the meters currently registered to you
            
            <asp:GridView ID="lstUserMeters" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" ForeColor="#333333" GridLines="None">
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <Columns>
                    <asp:HyperLinkField DataNavigateUrlFields="MeterId" 
                        DataNavigateUrlFormatString="~/meter/MeterDaily.aspx?MeterId={0}" 
                        DataTextField="MeterName" HeaderText="Meter" />
                        
                        
                    <asp:BoundField DataField="Days" HeaderText="Days" />
                    <asp:BoundField DataField="TotalKWh" HeaderText="Total kWh" />
                    <asp:BoundField DataField="Average" HeaderText="Average kWh" />
               <asp:HyperLinkField DataNavigateUrlFields="MeterId" 
                        DataNavigateUrlFormatString="~/manual/EnergyEntry_electricity.aspx?meterId={0}" 
                        Text="Add new reading" />
                         </Columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <EmptyDataTemplate>
                    You do not appear to have any manual reading electricity meters. Why not
                    <a href="meter/AddNewManual.aspx"><span style="color: #333333">create </span></a> 
                    one?
                </EmptyDataTemplate>
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
            
           
    <br />
        </LoggedInTemplate>
        <AnonymousTemplate>
            Welcome to Communergy. Please <asp:LoginStatus ID="LoginStatus1" runat="server" /> or <a href="membership/register.aspx">register</a>
        </AnonymousTemplate>
    </asp:LoginView>
    <br />
    
    
            <asp:CHART ID="chartRange" runat="server" BackColor="#D3DFF0" 
        BackGradientStyle="TopBottom" BorderColor="26, 59, 105" BorderDashStyle="Solid" 
        BorderWidth="2" Height="400px" 
        ImageLocation="~/TempImages/ChartPic_#SEQ(300,3)" ImageType="Png" 
        Palette="BrightPastel" Width="812px">
                <legends>
                    <asp:Legend BackColor="Transparent" Enabled="False" 
                        Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False" Name="Default">
                    </asp:Legend>
                </legends>
                <borderskin SkinStyle="Emboss" />
                <Titles>
                    <asp:Title Font="Microsoft Sans Serif, 12pt, style=Bold" Name="mainTitle">
                    </asp:Title>
                    <asp:Title Name="userTitle" Visible="False">
                    </asp:Title>
                </Titles>
                <series>
                    
                    <asp:Series BorderColor="180, 26, 59, 105" ChartType="RangeColumn" 
                        Color="220, 65, 140, 240" Name="Default" YValuesPerPoint="2" 
                        CustomProperties="DrawingStyle=Cylinder" Palette="Excel" 
                        XValueType="DateTime">
                    </asp:Series>
                </series>
                <chartareas>
                    <asp:ChartArea BackColor="64, 165, 191, 228" BackGradientStyle="TopBottom" 
                        BackSecondaryColor="Transparent" BorderColor="64, 64, 64, 64" 
                        BorderDashStyle="Solid" Name="ChartArea1" ShadowColor="Transparent">
                        <area3dstyle Inclination="15" IsClustered="False" IsRightAngleAxes="False" 
                            Perspective="10" Rotation="10" WallWidth="0" />
                        <axisy LineColor="64, 64, 64, 64" Title="kWh">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </axisy>
                        <axisx IsMarginVisible="False" LineColor="64, 64, 64, 64" Title="Date" >
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </axisx>
                    </asp:ChartArea>
                </chartareas>
    </asp:CHART>
        
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="True">
    </asp:ScriptManager>
    <br />
</asp:Content>
